import sbt.Keys.libraryDependencies

lazy val AkkaVersion = "2.6.19"
lazy val AkkaHttpVersion = "10.2.9"
lazy val AkkaHttpJsonSerializersVersion = "1.39.2"
lazy val AkkaAlpakkaVersion = "3.0.4"
lazy val circeVersion = "0.14.2"

lazy val root = (project in file("."))
  .settings(
    name := "Raiden",
    version := "0.5.0",
    scalaVersion := "2.13.8",
    libraryDependencies ++= Seq(
      // akka support
      "com.typesafe.akka"   %% "akka-actor-typed"            % AkkaVersion,
      "com.typesafe.akka"   %% "akka-stream-typed"           % AkkaVersion,
      "com.typesafe.akka"   %% "akka-http"                   % AkkaHttpVersion,
      "com.typesafe.akka"   %% "akka-persistence-typed"      % AkkaVersion,
      "com.typesafe.akka"   %% "akka-cluster-typed"          % AkkaVersion,
      "com.typesafe.akka"   %% "akka-cluster-sharding-typed" % AkkaVersion,

      // akka additional module
      "com.typesafe.akka"   %% "akka-http-spray-json"        % AkkaHttpVersion,
      "de.heikoseeberger"   %% "akka-http-circe"             % AkkaHttpJsonSerializersVersion,
      "com.typesafe.akka"   %% "akka-persistence-cassandra"  % "1.0.5",

      // alpakka
      "com.lightbend.akka" %% "akka-stream-alpakka-mqtt"     % AkkaAlpakkaVersion,

      // json support
      "io.circe"           %% "circe-core"                   % circeVersion,
      "io.circe"           %% "circe-generic"                % circeVersion,
      "io.circe"           %% "circe-parser"                 % circeVersion,


      "com.typesafe.akka"   %% "akka-http-testkit"           % AkkaHttpVersion % Test,
      "com.typesafe.akka"   %% "akka-actor-testkit-typed"    % AkkaVersion     % Test,
      "org.scalatest"       %% "scalatest"                   % "3.2.12"        % Test,

      "com.typesafe.slick"  %% "slick"                       % "3.3.3",
      "org.postgresql"      %  "postgresql"                  % "42.3.6",
      "com.typesafe.slick"  %% "slick-hikaricp"              % "3.3.3",
      "com.github.tminglei" %% "slick-pg"                    % "0.20.3",
      "com.github.tminglei" %% "slick-pg_play-json"          % "0.20.3",

      // JWT
      "com.pauldijou"       %% "jwt-spray-json"              % "5.0.0",
      "ch.qos.logback"      %  "logback-classic"             % "1.2.11",

      // logging
      "ch.qos.logback"      % "logback-classic"              % "1.2.11",

      // compiler plugin support
      compilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1")
    ),
    Compile / scalacOptions ++= Seq(
      "-Ymacro-annotations"
    )
  )